﻿<?xml version="1.0" encoding="utf-8" ?>
<DbDataRequest connection="$UserLoginDBConnection$" type="$UserLoginDbType$" defaultFormatter="bizobj Company">
  <SqlStatement hasResults="true">
    SELECT id,canCreateChildCompanies FROM Companies 
    WHERE canCreateChildCompanies=0 AND id = 
      (SELECT t.parentHostId FROM CompanyTree t WHERE t.companyId=@companyId)
  </SqlStatement>
  <Param name="companyId" type="UniqueIdentifier"/>
</DbDataRequest>